import request from '@/utils/request'

// 查询地图设备
export function maplist(params?: any) {
    return request.get({ url: '/device/maplist', params })
}
//设备列表
export function list(params?: any) {
    return request.get({ url: '/device/list', params })
}
//查询所有的站点
export function fetchSiteList(params?: any) {
    return request.get({ url: '/site/list', params })
}
// 设备新增
export function deviceAdd(params: Record<string, any>) {
    return request.post({ url: '/device/add', params })
}
//设备编辑
export function deviceEdit(params: Record<string, any>) {
    return request.post({ url: '/device/edit', params })
}
//设备详情
export function detail(params?: any) {
    return request.get({ url: '/device/detail', params })
}
//液位曲线图
export function liqulist(params?: any) {
    return request.get({ url: '/device/liqu', params })
}

//导出液位Excel
export function excel(params: any) {
    return request.get(
	{ responseType: 'blob',url: '/device/excel', params },
	{
	    isTransformResponse: false
	}
	)
}

//远程控制
export function Statecontrol(params?: any) {
    return request.get({ url: '/device/control', params })
}

//效验操作密码
export function effect(params?: any) {
    return request.get({ url: '/device/effect', params })
}

//查询设备控制参数
export function Parameter(params?: any) {
    return request.get({ url: '/device/Parameter', params })
}

//下发设备控制参数
export function deviceControl(params?: any) {
    return request.get({ url: '/device/deviceControl', params })
}


